using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BulletController : MonoBehaviour
{
    private Rigidbody bulletRb;
    private void Start()
    {
        bulletRb = GetComponent<Rigidbody>();
        Invoke("SelfDestroy", 1f);
    }
    // Update is called once per frame
    void Update()
    {
        transform.Translate(Vector3.forward * Time.deltaTime * 10f);
    }

    //private void OnTriggerEnter(Collider other)
    //{
    //    if(other.CompareTag("Enemy"))
    //    {
    //        Destroy(gameObject);
    //        Destroy(other.gameObject);
    //    }
    //}

    void SelfDestroy()
    {
        Destroy(gameObject);
    }

}
